package logic

import (
	"context"
	"me/123/common/proto/order"
	"me/123/service/server"
)

type OrderServer struct {
	order.UnimplementedOrderServer
}

func (o OrderServer) OrderCreate(ctx context.Context, req *order.OrderCreateRequest) (*order.OrderCreateResponse, error) {
	create, err := server.OrderCreate(req)
	if err != nil {
		return nil, err
	}
	return create, nil
}

func (o OrderServer) UpdateOrderStatus(ctx context.Context, req *order.UpdateOrderStatusRequest) (*order.UpdateOrderStatusResponse, error) {
	create, err := server.UpdateOrderStatus(req)
	if err != nil {
		return nil, err
	}
	return create, nil
}
